<?php
class Product_search extends Controller
{

    function Product_search(){

        parent::Controller();

        $this->load->model('productsmodel');   
  

    }

    public function recent_searches($id = FALSE){

        $data['search_items'] = $this->productsmodel->get_search_history();

        if ($data['search_items'] !== FALSE) 
            $this->load->view("product_search_recent", $data);       

    }  

    public function clear_history($controller='', $method='', $property=''){

        $data['search_items'] = $this->productsmodel->clear_search_history();    

        redirect($controller.'/'.$method.'/'.$property);
        
     
    }   


    /*
    *   Show the search form
    */
    public function quick_search($search_string = FALSE){

        $data['search_string'] = $search_string;

        $this->load->view("product_search_form", $data);       
     
    }    
  
}
?>
